#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

bool lessfc(int x, int y)
{
	return x < y;
}

bool  greaterfc(int x, int y)
{
	return x > y;
}

// A这个类要回调
class A
{
public:
	A(bool(*pf)(int, int))
		:_pf(pf)
	{}

	void func(int xx, int yy)
	{
		cout << "void func(int xx, int yy)" << _pf(xx, yy) << endl;;
	}

	bool(*_pf)(int, int);
};

int main()
{
	A aa1(lessfc);
	aa1.func(1, 2);

	A aa2(greaterfc);
	aa2.func(1, 2);
}